<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<script type="text/javascript" src="js/jquery-1.12.4.js"></script>
	<script type="text/javascript">
		$(function() {
			$("table tr:odd").css("background", "#ffc107");
		})

		function Delete(id) {
			if(confirm("确认删除该会员信息吗？")){
				$.getJSON("DeleteServlet", "id=" + id, judgeFina);

				function judgeFina(data) {
					if (data.result == "true") {
						alert(data.message);
						location.reload();
					} else {
						
					}
				}
			}
		}
	</script>
	<div align="center">
		<p>${message}</p>
		<table border="1" align="center">
			<tr>
				<th style="background: #ffeb3b" colspan="7">俱乐部会员信息</th>
			</tr>
			<tr>
				<th>编号</th>
				<th>姓名</th>
				<th>性别</th>
				<th>年龄</th>
				<th>家庭住址</th>
				<th>Email</th>
				<th>操作</th>
			</tr>
			<c:forEach var="mList" items="${requestScope.list }">
				<tr>
					<td align="center"><a href="SeekIdServlet?id=${mList.id }">${mList.id }</a></td>
					<td align="center">${mList.mName }</td>
					<td align="center">${mList.mGender }</td>
					<td align="center">${mList.mAge }</td>
					<td align="center">${mList.mAddress }</td>
					<td align="center">${mList.mEmail }</td>
					<td align="center"><a href="#" onclick="Delete(${mList.id }) ">删除</a></td>
				</tr>
			</c:forEach>
		</table>
	</div>
</body>
</html>